# 1 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/user/al.wqcpmg_dec.lk"
;al.wqcpmg_cw

; WURST-QCPMG
; Written by Luke O'Dell, April 2009
; L.A. O'Dell and R.W. Schurko
; Chemical Physics Letters 464 (2008) 97-102
; Modified by Andy, 090921

; First create the desired WURST pulse in Shape Tool
; and set its filename and length in AcquPars
; Alternatively, use pre-made shapes such as:
; W.1MHz.LTH (50us, 1.0MHz sweep, low to high freq)
; W.500kHz.HTL(50us, 500kHz sweep, high to low freq)
; NB "Low to high field" in Shape Tool means high to
; low frequency for the sweep direction
; Make sure TD is set to the same value as setTD.
; It is also important to optimize the power
; of the WURST pulses (SP1).
; Change the values of D3 and D10 to adjust the
; separation between spikelets (spikesep, in Hz)
# 22 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/user/al.wqcpmg_dec.lk"
;parameters:
;ns : should be a multiple of 8
;d1 : recycle delay
;d3 : time to allow pulse ringdown
;d10 : enter duration of echo
;p1 : WURST pulse length (usually 50 us)
;pl1 : not used (= 120 dB)
;l22 : # of echos to be acquired
;setTD : set TD to this
;spikesep : spikelet separation in Hz
;d25 : not used
;d26 : not used

# 1 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/Avancesolids.incl" 1
;Avancesolids.incl
;   for TCU3
;
;version 1 28.2.2001, written by HF
;	   4.4.2006, complemented by Ste

;$CLASS=Solids INCL
;$COMMENT=definitions for setrtp and setnmr
# 10 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/Avancesolids.incl"
;switch between 1H or 19F output (H amplifier) 


# 14 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/Avancesolids.incl"
;gating pulse for RX, ADC and HPPR auto mode


# 18 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/Avancesolids.incl"
;explicit blanking of preamp, receiver, adc, not implemented yet


# 26 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/Avancesolids.incl"
;generate dwell clock


;turn dwell clock on/off
# 32 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/Avancesolids.incl"
;


# 36 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/Avancesolids.incl"
;define data sampling for WAHUHA type experiments, samples analogue or digitally for d9, closes receiver


# 40 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/Avancesolids.incl"
;explicit transmitter blanking, not supported yet

;NCO switching, to be implemented

;$id: $
# 35 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/user/al.wqcpmg_dec.lk" 2
# 37 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/user/al.wqcpmg_dec.lk"
define delay echod
"echod=(d10/2)-(p1/2)+2u"
define delay setTD
"setTD=(p1/2+l22*(2*d3+p1+4u+d10)+7u)/dw"
"d25=1/setTD"
define delay spikesep
"spikesep=(1/(2*d3+4u+p1+d10))"
"d26=spikesep"


# 1 "mc_line 47 file C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/user/al.wqcpmg_dec.lk dc-measurement inserted automatically"

    dccorr
# 47 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/user/al.wqcpmg_dec.lk"
1 ze
  10u pl2:f2
2 d1 do:f2
  10u reset:f1
  (1u sync 1u adc ph31 syrec)
  (1u ph30:r):f1
  1u setrtp1^5
  1u setnmr0|0^16
  1u
  (p1:sp1 ph1):f1
  echod
  1u cpds2:f2
3 d3
  (p1:sp1 ph2):f1
  d3
  1u setrtp1|0
  1u setnmr0^0|16
  d10 setrtp1|5
  1u setrtp1^5
  1u setnmr0|0^16
  lo to 3 times l22
  1u setrtp1^0
  1m do:f2
  rcyc=2
  10m wr #0
exit
# 74 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/user/al.wqcpmg_dec.lk"
ph0=0
ph1=0 0 1 1 2 2 3 3 
ph2=1 3 2 0 3 1 0 2 
ph30=0
ph31=0 0 1 1 2 2 3 3 
